package com.share.quartz.service;

import org.quartz.SchedulerException;

import com.share.quartz.service.IQuartzJobEntity;

public interface QuartzJobService {
	/**
	 * 添加新job并启动
	 */
	public void addNewJob(IQuartzJobEntity jobEntity ) throws SchedulerException ;
	/**
	 * 暂停任务
	 * @param jobEntity
	 * @throws SchedulerException
	 */
	public void pauseJob(IQuartzJobEntity jobEntity)throws SchedulerException ;
	/**
	 * 恢复任务
	 * @param jobEntity
	 * @throws SchedulerException
	 */
	public void resumeJob(IQuartzJobEntity jobEntity) throws SchedulerException;
	/**
	 * 删除任务
	 * @param jobEntity
	 * @throws SchedulerException
	 */
	public void deleteJob(IQuartzJobEntity jobEntity) throws SchedulerException;
	/**
	 * 立即运行任务
	 * @param jobEntity
	 * @throws SchedulerException
	 */
	public void triggerJob(IQuartzJobEntity jobEntity) throws SchedulerException;
	/**
	 * 更新任务（时间表达式）
	 * @param jobEntity
	 * @throws SchedulerException
	 */
	public void rescheduleJob(IQuartzJobEntity jobEntity) throws SchedulerException;
}
